package com.kh.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kh.dao.HelloDao;
import com.kh.msdao.HelloDaoMS;
import com.kh.pojo.HelloPojo;

@Service
@Transactional
public class SayHello {
	@Autowired
	private HelloDao dao;
	@Autowired
	HelloDaoMS helloDaoMS;

	public List<HelloPojo> getData(HelloPojo pojo) {
		return dao.blogList(pojo);
	}

	public void save(HelloPojo hello) {
		dao.save(hello);
		 int i = 1 / 0;
	}

	public void saveMs(HelloPojo hello) {
		helloDaoMS.save(hello);
//		int i = 1 / 0;
	}

}
